Good suggestion eskimo , just updated from iOS 14.1 to iOS 14.2 (on iPhone 6S) and still no UDP reception.
(Warning , you also need a 10GB download of Xcode 12.2 RC to deploy to iOS 14.2 )
We tried uninstalling and re-installing via TestFlight - still nothing.
We left it for a few hours, then opened the app again and were prompted with a pop up :
"xxxxx would like to find/connect to local devices on your network"
We clicked OK and now it does receive the UDP packets.
So - the question is should it have displayed that pop up earlier and if so how can we make it appear on first install ?
One Stackoverflow - https://stackoverflow.com/questions/63525026/what-triggers-the-would-like-to-find-and-connect-to-devices-on-your-local-netwo says this is a Bonjour request, but this app does not use Bonjour. So should I add this entitlement to ensure the pop up appears sooner ?
Another Stackoverflow post - https://stackoverflow.com/questions/64308595/how-to-trigger-the-local-network-dialog-authorization-for-multicast-entitlement suggests to move minimum build target to 12.0 which is what we have, so maybe we should increment this more ?
Any more suggestions welcome.
Post
Replies
Boosts
Views
Activity
Thanks again eskimo for the link, see Triggering the Local Network Privacy Alert - https://developer.apple.com/forums/thread/663768.
We added the UDP write functions which are in Swift, and this is an Objective C app, so had to go through the motions of creating a Swift bridging header to import into ObjC - see link. - https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_swift_into_objective-c Also wrapping the function calls in a class with @objc modifiers.
The Network Permissions request [i] now pops up immediately which is a big improvement. It still takes about a minute for the UDP to start being received after that, provided you unload and re-open the app. But it seems to start reliably enough now.
Side note: I get a device black screen when running the app in debug mode on iOS 14.2 with Xcode 12.2 RC.
[i] Here's the exact text of the pop-up to maybe help people find this post:
App Name would like to find and connect to devices on your local network. This app will be able to discover and connect to devices on the networks you use.
I had a a similar error on iPhone6S after Xcode 12.2 upgrade.
_shouldMakeReadyForDevelopment
I noticed it mentioned passcode, which was disabled on my iPhone6S.
So I re-enabled the passcode and now I can get the app to run.
Now all apps (including ones created with Xcode 12.2) take > 30secs to load when debugging on device.
There is no such problem with my iPhone 6 device running iOS 12.
Devices 'Connect via Network' tick/untick makes no difference.